<?php

namespace App\Http\Controllers;
use App\Http\Requests;
use Illuminate\Http\Request;
use App\Models\Option;
use App\Models\Article;
use Carbon\Carbon,DB;
use Wechat;
class HomeController extends Controller
{
    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        //$this->middleware('auth');
    }

    /**
     * Show the application dashboard.
     *
     * @return \Illuminate\Http\Response
     */
    public function index(Request $request)
    {
        $options = Option::select('id','name','icon','code','times','currency_name','currency_unit', 'exchange_rate',
        'description',
        'timesdescription',
        'fluctuation',   //最小波动值
        'fluctuation_price', //最小波动价格
        'surplus_value',    //止盈值
        'stop_loss_value',  //止损值
        'stop_loss_margin', //止损保证金
        'transaction_cost', //综合交易费
        'hand_count')->where('status','=',1)->get();
        return view('home.index.index',compact('options'));
    }
}
